<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!-- view层 -->
<div id="v1">
  <h1 v-if="d==='A'">A</h1>
  <h1 v-else-if="d==='B'">B</h1>
  <h1 v-else>D</h1>
</div>

<!-- 导入vue包 -->
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.min.js"></script>
<script>
  var vm = new Vue({
    el: "#v1",
    <!-- Model层 -->
    data: {
      d: "A"
    }
  })
</script>
</body>
</html>